cfg for a^ib^jc^k